<%--
  Created by IntelliJ IDEA.
  User: 86147
  Date: 2024/3/21
  Time: 22:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>书城页面的头部</title>
</head>
<body>
<div id="divhead" align="center">
    <table cellspacing="0" class="headtable">
        <tr>
            <td style="padding-left: 100px;">
                <a href="../register.jsp">
                    <img src="images/logo.jpg" width="200" height="60" border="0" />
                </a>
            </td>
            <td style="text-align:right;padding-right:100px;" >
                <img src="images/cart.gif" width="26" height="23" style="margin-bottom:-4px" />&nbsp;
                <a href="Cart.jsp" style="color: steelblue;text-decoration: none;">购物车</a>
                | <a href="#" style="color: steelblue;text-decoration: none;">帮助中心</a>
                | <a href="#" style="color: steelblue;text-decoration: none;">我的帐户</a>
                | <%= ((String)session.getAttribute("username")==null)?
                    "<a style=\"color: steelblue;text-decoration: none;\" href='" + request.getContextPath() + "/WebContent/client/register.jsp'>新用户注册</a>":
                    "<a style=\"color: steelblue;text-decoration: none;\" href='" + request.getContextPath() + "/WebContent/client/exist.jsp'>用户退出</a>" %>
            </td>
        </tr>
        <% if ((String)session.getAttribute("username") != null) { %>
        <tr style="text-align: right;">
            <td>欢迎您：<%= (String)session.getAttribute("username") %></td>
        </tr>
        <% } %>
    </table>
</div>
</body>
</html>
